#ifndef __eeprom_bsp_H_
#define __eeprom_bsp_H_


//sizeof() <= 256
struct EEPROM_FORMAT_S
{
	u32 crc;//this must at fisrt
	u32 test1;
	u32 test2;
	u32 test3;
	char string[16];
	int test4;
	unsigned int test5;
	unsigned char test6;
	float test7;
};
typedef union EEPORM_DATA_S
{
	u8 buff[EEPROM_PAGE_SIZE];//this must == sizeof(D)
	struct EEPROM_FORMAT_S D;
}EEPORM_DATA;

void eeprom_data_crc_set(EEPORM_DATA * data);
void eeprom_bsp_init(EEPORM_DATA* const data);
int eeporm_bsp_save_data(void);

#endif

